// ts书写类
(() => {
  interface IPerson {
    firstname: string,
    lastname: string
  }
  // 创建一个类
  class User {
    firstName: string
    lastName: string
    fullName: string
    constructor(firstname: string, lastname: string) {
      this.firstName = firstname
      this.lastName = lastname
      this.fullName = firstname + '_' + lastname
    }
  }

  let user = new User('Zhou','ZhangHeng')
  console.log(user.fullName);
  
})()